import Login from '@/components/login/login'
import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/main',
      name: 'Main',
      component: () => import('@/components/main/main'),
      children: [
        {
          path: '/',
          name: 'index',
          component: () => import('@/components/index/index.vue')
        },
        {
          path: 'personalInvestment',
          name: 'personalInvestment',
          component: () => import('@/components/consumer/personalInvestment.vue')
        },
        {
          path: 'goods',
          name: 'goods',
          component: () => import('@/components/Operations/goods.vue')
        },
        {
          path: 'redEnvelope',
          name: 'redEnvelope',
          component: () => import('@/components/Operations/redEnvelope.vue')
        },
        {
          path: 'addredEnvelope',
          name: 'addredEnvelope',
          component: () => import('@/components/Operations/addredEnvelope.vue')
        },
        {
          path: 'redRecord',
          name: 'redRecord',
          component: () => import('@/components/Operations/redRecord.vue')
        },
        {
          path: 'points',
          name: 'points',
          component: () => import('@/components/Operations/points.vue')
        },
        {
          path: 'pointsRecord',
          name: 'pointsRecord',
          component: () => import('@/components/Operations/pointsRecord.vue')
        },
        {
          path: 'goodsRecord',
          name: 'goodsRecord',
          component: () => import('@/components/Operations/goodsRecord.vue')
        },
        {
          path: 'addVouchers',
          name: 'addVouchers',
          component: () => import('@/components/Operations/addVouchers.vue')
        },
        {
          path: 'vouchersRecord',
          name: 'vouchersRecord',
          component: () => import('@/components/Operations/vouchersRecord.vue')
        },
        {
          path: 'department',
          name: 'department',
          component: () => import('@/components/system/department.vue')
        },
        {
          path: 'updatePassword',
          name: 'updatePassword',
          component: () => import('@/components/system/updatePassword.vue')
        },
        {
          path: 'role',
          name: 'role',
          component: () => import('@/components/system/role.vue')
        },
        {
          path: 'employee',
          name: 'employee',
          component: () => import('@/components/system/employee.vue')
        },
        {
          path: 'recharge',
          name: 'recharge',
          component: ()=> import('@/components/finance/recharge.vue')
        },
        {
          path: 'withdraw',
          name: 'withdraw',
          component: ()=> import('@/components/finance/withdraw.vue')
        },
        {
          path: 'corporateInvestment',
          name: 'corporateInvestment',
          component: () => import('@/components/consumer/corporateInvestment.vue')
        },
        {
          path: 'personalLoan',
          name: 'personalLoan',
          component: () => import('@/components/consumer/personalLoan.vue')
        },
        {
          path: 'corporateLoan',
          name: 'corporateLoan',
          component: () => import('@/components/consumer/corporateLoan.vue')
        },
        {
          path: 'personalGuarantee',
          name: 'personalGuarantee',
          component: () => import('@/components/consumer/personalGuarantee.vue')
        },
        {
          path: 'corporateGuarantee',
          name: 'corporateGuarantee',
          component: () => import('@/components/consumer/corporateGuarantee.vue')
        },
        {
          path: 'preliminary_loan_review',
          name: 'preliminary_loan_review',
          component: ()=> import('@/components/project/preliminary_loan_review')
        },
        {
          path: 'bidding_management',
          name: 'bidding_management',
          component: ()=> import('@/components/project/bidding_management')
        },
        {
          path: 'full_standard_review',
          name: 'full_standard_review',
          component: ()=> import('@/components/project/full_standard_review')
        },
        {
          path: 'loan_management',
          name: 'loan_management',
          component: ()=> import('@/components/project/loan_management')
        },
        {
          path: 'bid_records',
          name: 'bid_records',
          component: ()=> import('@/components/project/bid_records')
        },
        {
          path: 'pending_collection_management',
          name: 'pending_collection_management',
          component: ()=> import('@/components/project/pending_collection_management')
        },
        {
          path: 'repayment_management',
          name: 'repayment_management',
          component: ()=> import('@/components/project/repayment_management')
        },
        {
          path: 'overdue_management',
          name: 'overdue_management',
          component: ()=> import('@/components/project/overdue_management')
        },
        {
          path: 'logs',
          name: 'logs',
          component: ()=> import('@/components/finance/logs.vue')
        },
        {
          path: 'consult',
          name: 'consult',
          component: ()=> import('@/components/finance/consult.vue')
        },
        {
          path: 'consumerRegister',
          name: 'consumerRegister',
          component: ()=> import('@/components/consumer/consumerRegister')
        },
      ]
    }
  ],
  mode: 'history'
})
